import { ref } from 'vue'
import { defineStore } from 'pinia'
import { getCategoryAPI } from "@/api/layout.js"
export const useCategoryStore = defineStore('category', () => {
    const categoryList = ref([])
    const getCategoryList = () => {
      getCategoryAPI().then(res => {
        categoryList.value = res.result || []
      })
    }
    return {
        categoryList,
        getCategoryList
    }
})
